home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / a_utils / perl / msds-prl / prl386ld.zoo / makefile < prev    next >
Makefile  |  1992-07-02  |  9KB  |  362 lines

  1. # : Makefile.SH,v 11668Revision: 4.0.1.4 11668Date: 92/06/08 11:40:43 $
  2. #
  3. # $Log:    Makefile.SH,v $
  4. # Revision 4.0.1.4  92/06/08  11:40:43  lwall
  5. # patch20: cray didn't give enough memory to /bin/sh
  6. # patch20: various and sundry fixes
  7. # Revision 4.0.1.3  91/11/05  15:48:11  lwall
  8. # patch11: saberized perl
  9. # patch11: added support for dbz
  10. # Revision 4.0.1.2  91/06/07  10:14:43  lwall
  11. # patch4: cflags now emits entire cc command except for the filename
  12. # patch4: alternate make programs are now semi-supported
  13. # patch4: uperl.o no longer tries to link in libraries prematurely
  14. # patch4: installperl now installs x2p stuff too
  15. # Revision 4.0.1.1  91/04/11  17:30:39  lwall
  16. # patch1: C flags are now settable on a per-file basis
  17. # Revision 4.0  91/03/20  00:58:54  lwall
  18. # 4.0 baseline.
  19. # makefile modified by hand to build on MS-DOS using DJGPP
  20. # Hitoshi Doi <doi@jrd.dec.com>, 1992.06.28
  21.  
  22. CC = gcc            # use DJGPP
  23. YACC = /pub/gcc/bin/bison
  24. bin = /usr/local/bin
  25. scriptdir = /usr/local/bin
  26. privlib = /usr/local/lib/perl
  27. mansrc = 
  28. manext = 
  29. LDFLAGS = 
  30. CLDFLAGS = 
  31. SMALL = 
  32. LARGE =  
  33. mallocsrc = 
  34. mallocobj = 
  35. SLN = ln -s
  36. RMS = rm -f
  37.  
  38. # use libraries: globbing, ufc-crypt
  39. libs = msdos/libmsdos.a -lglob -lufc -lc -lm -lpc    # use DJGPP
  40.  
  41. public = perl taintperl 
  42.  
  43. shellflags = 
  44.  
  45. # To use an alternate make, set  in config.sh.
  46. MAKE = make
  47.  
  48.  
  49. #CCCMD = `sh $(shellflags) cflags $@`
  50. CCCMD = $(CC) -O -c        # use DJGPP
  51.  
  52. private = 
  53.  
  54. scripts = h2ph
  55.  
  56. manpages = perl.man h2ph.man
  57.  
  58. util =
  59.  
  60. sh = Makefile.SH makedepend.SH h2ph.SH
  61.  
  62. h1 = EXTERN.h INTERN.h arg.h array.h cmd.h config.h form.h handy.h
  63. h2 = hash.h perl.h regcomp.h regexp.h spat.h stab.h str.h util.h
  64.  
  65. h = $(h1) $(h2)
  66.  
  67. c1 = array.c cmd.c cons.c consarg.c doarg.c doio.c dolist.c dump.c
  68. c2 = eval.c form.c hash.c $(mallocsrc) perl.c regcomp.c regexec.c
  69. c3 = stab.c str.c toke.c util.c usersub.c
  70.  
  71. c = $(c1) $(c2) $(c3)
  72.  
  73. s1 = array.c cmd.c cons.c consarg.c doarg.c doio.c dolist.c dump.c
  74. s2 = eval.c form.c hash.c perl.c regcomp.c regexec.c
  75. s3 = stab.c str.c toke.c util.c usersub.c perly.c
  76.  
  77. saber = $(s1) $(s2) $(s3)
  78.  
  79. obj1 = array.o cmd.o cons.o consarg.o doarg.o doio.o dolist.o dump.o
  80. obj2 = eval.o form.o $(mallocobj) perl.o regcomp.o regexec.o
  81. obj3 = stab.o str.o toke.o util.o
  82.  
  83. obj = $(obj1) $(obj2) $(obj3)
  84.  
  85. tobj1 = tarray.o tcmd.o tcons.o tconsarg.o tdoarg.o tdoio.o tdolist.o tdump.o
  86. tobj2 = teval.o tform.o thash.o $(mallocobj) tregcomp.o tregexec.o
  87. tobj3 = tstab.o tstr.o ttoke.o tutil.o
  88.  
  89. tobj = $(tobj1) $(tobj2) $(tobj3)
  90.  
  91. lintflags = -hbvxac
  92.  
  93. addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
  94.  
  95. # grrr
  96. #SHELL = /bin/sh
  97.  
  98. .c.o:
  99.     $(CCCMD) $*.c
  100.  
  101. # MS-DOS perl
  102. all: perlstub.exe perl386.exe
  103.  
  104. STUB = /pub/gcc/bin/stub.exe
  105. GO32 = /pub/gcc/bin/go32.exe
  106. perlstub.exe: perl
  107.     /usr/bin/cat +binary $(STUB) perl > perlstub.exe
  108. perl386.exe: perl
  109.     /usr/bin/cat +binary $(GO32) perl > perl386.exe
  110.  
  111. # put the list of objects in a file because of MS-DOS limits
  112. objfile = perlobjs
  113.  
  114. # round up all files modified for perl386
  115. KITDIR = ../386kit
  116. MODSRC = config.h perl.c doio.c toke.c makefile $(objfile) readme.386 \
  117.     msdos/popen.c msdos/msdos.c msdos/makefile.386
  118. 386kit: $(KITDIR)
  119.     cp perl386.exe $(KITDIR)
  120.     cp $(MODSRC) $(KITDIR)
  121. $(KITDIR):
  122.     mkdir $(KITDIR)
  123.  
  124. #all: $(public) $(private) $(util) uperl.o $(scripts)
  125. #    cd x2p; $(MAKE) all
  126. #    touch all
  127.  
  128. # This is the standard version that contains no "taint" checks and is
  129. # used for all scripts that aren't set-id or running under something set-id.
  130. # The $& notation is tells Sequent machines that it can do a parallel make,
  131. # and is harmless otherwise.
  132.  
  133. perl: $& perly.o $(obj) hash.o usersub.o
  134. #    $(CC) $(LARGE) $(CLDFLAGS) $(obj) hash.o perly.o usersub.o $(libs) -o perl
  135.     $(CC) $(LARGE) $(CLDFLAGS) @$(objfile) $(mallocobj) $(libs) -o perl
  136.  
  137. # This command assumes that /usr/include/dbz.h and /usr/lib/dbz.o exist.
  138.  
  139. dbzperl: $& perly.o $(obj) zhash.o usersub.o
  140.     $(CC) $(LARGE) $(CLDFLAGS) $(obj) zhash.o /usr/lib/dbz.o perly.o usersub.o $(libs) -o dbzperl
  141.  
  142. zhash.o: hash.c $(h)
  143.     $(RMS) zhash.c
  144.     $(SLN) hash.c zhash.c
  145.     $(CCCMD) -DWANT_DBZ zhash.c
  146.     $(RMS) zhash.c
  147.  
  148. uperl.o: $& perly.o $(obj) hash.o
  149.     -ld $(LARGE) $(LDFLAGS) -r $(obj) hash.o perly.o -o uperl.o
  150.  
  151. saber: $(saber)
  152.     # load $(saber)
  153.     # load /lib/libm.a
  154.  
  155. # This version, if specified in Configure, does ONLY those scripts which need
  156. # set-id emulation.  Suidperl must be setuid root.  It contains the "taint"
  157. # checks as well as the special code to validate that the script in question
  158. # has been invoked correctly.
  159.  
  160. suidperl: $& tperly.o sperl.o $(tobj) usersub.o
  161.     $(CC) $(LARGE) $(CLDFLAGS) sperl.o $(tobj) tperly.o usersub.o $(libs) \
  162.         -o suidperl
  163.  
  164. # This version interprets scripts that are already set-id either via a wrapper
  165. # or through the kernel allowing set-id scripts (bad idea).  Taintperl must
  166. # NOT be setuid to root or anything else.  The only difference between it
  167. # and normal perl is the presence of the "taint" checks.
  168.  
  169. taintperl: $& tperly.o tperl.o $(tobj) usersub.o
  170.     $(CC) $(LARGE) $(CLDFLAGS) tperl.o $(tobj) tperly.o usersub.o $(libs) \
  171.         -o taintperl
  172.  
  173. # Replicating all this junk is yucky, but I don't see a portable way to fix it.
  174.  
  175. tperly.o: perly.c perly.h $(h)
  176.     $(RMS) tperly.c
  177.     $(SLN) perly.c tperly.c
  178.     $(CCCMD) -DTAINT tperly.c
  179.     $(RMS) tperly.c
  180.  
  181. tperl.o: perl.c perly.h patchlevel.h perl.h $(h)
  182.     $(RMS) tperl.c
  183.     $(SLN) perl.c tperl.c
  184.     $(CCCMD) -DTAINT tperl.c
  185.     $(RMS) tperl.c
  186.  
  187. sperl.o: perl.c perly.h patchlevel.h $(h)
  188.     $(RMS) sperl.c
  189.     $(SLN) perl.c sperl.c
  190.     $(CCCMD) -DTAINT -DIAMSUID sperl.c
  191.     $(RMS) sperl.c
  192.  
  193. tarray.o: array.c $(h)
  194.     $(RMS) tarray.c
  195.     $(SLN) array.c tarray.c
  196.     $(CCCMD) -DTAINT tarray.c
  197.     $(RMS) tarray.c
  198.  
  199. tcmd.o: cmd.c $(h)
  200.     $(RMS) tcmd.c
  201.     $(SLN) cmd.c tcmd.c
  202.     $(CCCMD) -DTAINT tcmd.c
  203.     $(RMS) tcmd.c
  204.  
  205. tcons.o: cons.c $(h) perly.h
  206.     $(RMS) tcons.c
  207.     $(SLN) cons.c tcons.c
  208.     $(CCCMD) -DTAINT tcons.c
  209.     $(RMS) tcons.c
  210.  
  211. tconsarg.o: consarg.c $(h)
  212.     $(RMS) tconsarg.c
  213.     $(SLN) consarg.c tconsarg.c
  214.     $(CCCMD) -DTAINT tconsarg.c
  215.     $(RMS) tconsarg.c
  216.  
  217. tdoarg.o: doarg.c $(h)
  218.     $(RMS) tdoarg.c
  219.     $(SLN) doarg.c tdoarg.c
  220.     $(CCCMD) -DTAINT tdoarg.c
  221.     $(RMS) tdoarg.c
  222.  
  223. tdoio.o: doio.c $(h)
  224.     $(RMS) tdoio.c
  225.     $(SLN) doio.c tdoio.c
  226.     $(CCCMD) -DTAINT tdoio.c
  227.     $(RMS) tdoio.c
  228.  
  229. tdolist.o: dolist.c $(h)
  230.     $(RMS) tdolist.c
  231.     $(SLN) dolist.c tdolist.c
  232.     $(CCCMD) -DTAINT tdolist.c
  233.     $(RMS) tdolist.c
  234.  
  235. tdump.o: dump.c $(h)
  236.     $(RMS) tdump.c
  237.     $(SLN) dump.c tdump.c
  238.     $(CCCMD) -DTAINT tdump.c
  239.     $(RMS) tdump.c
  240.  
  241. teval.o: eval.c $(h)
  242.     $(RMS) teval.c
  243.     $(SLN) eval.c teval.c
  244.     $(CCCMD) -DTAINT teval.c
  245.     $(RMS) teval.c
  246.  
  247. tform.o: form.c $(h)
  248.     $(RMS) tform.c
  249.     $(SLN) form.c tform.c
  250.     $(CCCMD) -DTAINT tform.c
  251.     $(RMS) tform.c
  252.  
  253. thash.o: hash.c $(h)
  254.     $(RMS) thash.c
  255.     $(SLN) hash.c thash.c
  256.     $(CCCMD) -DTAINT thash.c
  257.     $(RMS) thash.c
  258.  
  259. tregcomp.o: regcomp.c $(h)
  260.     $(RMS) tregcomp.c
  261.     $(SLN) regcomp.c tregcomp.c
  262.     $(CCCMD) -DTAINT tregcomp.c
  263.     $(RMS) tregcomp.c
  264.  
  265. tregexec.o: regexec.c $(h)
  266.     $(RMS) tregexec.c
  267.     $(SLN) regexec.c tregexec.c
  268.     $(CCCMD) -DTAINT tregexec.c
  269.     $(RMS) tregexec.c
  270.  
  271. tstab.o: stab.c $(h)
  272.     $(RMS) tstab.c
  273.     $(SLN) stab.c tstab.c
  274.     $(CCCMD) -DTAINT tstab.c
  275.     $(RMS) tstab.c
  276.  
  277. tstr.o: str.c $(h) perly.h
  278.     $(RMS) tstr.c
  279.     $(SLN) str.c tstr.c
  280.     $(CCCMD) -DTAINT tstr.c
  281.     $(RMS) tstr.c
  282.  
  283. ttoke.o: toke.c $(h) perly.h
  284.     $(RMS) ttoke.c
  285.     $(SLN) toke.c ttoke.c
  286.     $(CCCMD) -DTAINT ttoke.c
  287.     $(RMS) ttoke.c
  288.  
  289. tutil.o: util.c $(h)
  290.     $(RMS) tutil.c
  291.     $(SLN) util.c tutil.c
  292.     $(CCCMD) -DTAINT tutil.c
  293.     $(RMS) tutil.c
  294.  
  295. perly.h: perly.c
  296.     @ echo Dummy dependency for dumb parallel make
  297.     touch perly.h
  298.  
  299. # use the perly.c already built on UNIX for DJGPP
  300. # perly.c: perly.y perly.fixer
  301. #    @ \
  302. #case "$(YACC)" in \
  303. #    *bison*) echo 'Expect' 25 shift/reduce and 59 reduce/reduce conflicts;; \
  304. #    *) echo 'Expect' 27 shift/reduce and 57 reduce/reduce conflicts;; \
  305. #esac
  306. #    $(YACC) -d perly.y
  307. #    sh $(shellflags) ./perly.fixer y.tab.c perly.c
  308. #    mv y.tab.h perly.h
  309. #    echo 'extern YYSTYPE yylval;' >>perly.h
  310.  
  311. perly.o: perly.c perly.h $(h)
  312.     $(CCCMD) perly.c
  313.  
  314. install: all
  315.     ./perl installperl
  316.  
  317. clean:
  318.     rm -f *.o all perl taintperl suidperl perly.c
  319.     cd x2p; $(MAKE) clean
  320.  
  321. realclean: clean
  322.     cd x2p; $(MAKE) realclean
  323.     rm -f *.orig */*.orig *~ */*~ core $(addedbyconf) h2ph h2ph.man
  324.     rm -f perly.c perly.h t/perl Makefile config.h makedepend makedir
  325.     rm -f makefile x2p/Makefile x2p/makefile cflags x2p/cflags
  326.     rm -f c2ph pstruct
  327.  
  328. # The following lint has practically everything turned on.  Unfortunately,
  329. # you have to wade through a lot of mumbo jumbo that can't be suppressed.
  330. # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
  331. # for that spot.
  332.  
  333. lint: perly.c $(c)
  334.     lint $(lintflags) $(defs) perly.c $(c) > perl.fuzz
  335.  
  336. depend: makedepend
  337.     - test -f perly.h || cp /dev/null perly.h
  338.     ./makedepend
  339.     - test -s perly.h || /bin/rm -f perly.h
  340.     cd x2p; $(MAKE) depend
  341.  
  342. test: perl
  343.     - cd t && chmod +x TEST */*.t
  344.     - cd t && (rm -f perl; $(SLN) ../perl perl) && ./perl TEST </dev/tty
  345.  
  346. clist:
  347.     echo $(c) | tr ' ' '\012' >.clist
  348.  
  349. hlist:
  350.     echo $(h) | tr ' ' '\012' >.hlist
  351.  
  352. shlist:
  353.     echo $(sh) | tr ' ' '\012' >.shlist
  354.  
  355. # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  356. # If this runs make out of memory, delete /usr/include lines.
  357.